Repository navigation
Conversation
Admins no longer get the provenance of tasks they don't own: the rule
`admins-get-provenance` is removed from the base config, so that
`GET /tasks/{id}/provenance` answers only to the task's owner. Everyone
else, admins included, gets `403 Forbidden`, also for unknown tasks, as
for `GET /tasks/{id}`. Admins of a TES gateway must not see the details
of other users' tasks.
Tests cover the owner (200), other users, outsiders and admins (403 for
existing and unknown tasks, GET and HEAD), no token (401), the base
config's rules, and overlays that still remove the rule (startup stops
with FOCA's error). Docs (API, access control, operations, OpenAPI) and
the upgrade notes are updated.
BREAKING CHANGE: admins get `403` for the provenance of tasks they don't
own; overlays with `admins-get-provenance: null` must drop that entry.
Closes #568
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011FSoqPsbB5s4NvhhYYcDJk
Tests that the rule stored by earlier versions stops applying when the app starts without it, and that variants of the provenance path never give admins the provenance. The upgrade notes name custom lists of rules, which must drop the rule too; docs re-wrapped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011FSoqPsbB5s4NvhhYYcDJk
Reviewer's GuideAPIChange the OpenAPI contract so provenance is available only to the task owner, with non-owners—including admins and callers for unknown tasks—receiving 403.
ImplementationUpdate the provenance retrieval docstring to describe the owner-only policy enforced by access-control rules.
ConfigurationRemove the admin provenance policy from the base configuration and update the access-control comments to state that provenance is owner-only.
Clarify in the access-control model comment that only task owners may read, cancel, or get provenance for a task.
DocumentationDocument owner-only provenance access, its 403 behavior for admins and unknown tasks, and the updated permissions and rule guidance.
Update the API endpoint and provenance documentation to specify owner-only access and its authorization responses.
Update the operations guidance to say that only owners receive task provenance.
Explain the breaking access change and required migration of stored rules, overlays, custom policy lists, and deployments during rolling upgrades.
TestsVerify owner-only provenance access, authorization for non-owners and unknown tasks, configuration and upgrade behavior, and path variants.
Assert that task tombstones return 404 to owners but 403 to admins for provenance requests.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
|
📖 5 files modified
Preview · build overview · proTES · built Dec. 5, 2026, 11:10 p.m. UTC |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #570 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 39 39
Lines 4021 4021
=========================================
Hits 4021 4021 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Linked issuesChecked at commit dc8ed1a #568 fix!: provenance only for the task owner · 3 of 4 met · 1 to check by hand
|
The 0.4.0 upgrade checklist no longer tells custom rule lists to add `admins-get-provenance`, but to leave it out; the provenance docs say that requests without a valid token get `401`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011FSoqPsbB5s4NvhhYYcDJk
The Permissions API section still listed the provenance of tasks among what admins see; it is for the task's owner only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011FSoqPsbB5s4NvhhYYcDJk
Sourcery withdrew this approval because the latest commits introduced blocking findings.
Summary
GET /tasks/{id}/provenancenow answers only to the owner of the task. The ruleadmins-get-provenanceis removed from the base config. Everyone else, admins included, gets403 Forbidden, also for unknown tasks. That is the same responseGET /tasks/{id}gives a non-owner, so the response doesn't tell whether a task exists. Before, admins got any task's provenance, and404for unknown tasks. The provenance tells which plugins and TES instances processed a task and when, which is a detail of someone else's task that admins must not see.pro_tes/config.yaml: the rule is removed and the comments are updated; themodel.confcomment and theget_task_provenancedocstring follow.GetTaskProvenance.docs/api.md: the table and the Provenance section.docs/access-control.md: the roles table, the rule list and Task ownership.docs/operations.md.docs/upgrading.md, Unreleased changes, breaking):admins-get-provenance: nullstop the start (FOCA's error), so drop that entry.Breaking change
Admins get
403for the provenance of tasks they don't own. Deployments that read the provenance with an admin's token must use the owner's token instead. Overlays that remove the rule (null, as the docs suggested before) must drop that entry.Verification
userget 403 on GET and HEAD.admins-get-provenance: nullstops startup.pre-commit run --all-files: all hooks pass (ruff, mypy, semgrep, actionlint, gitleaks, ...).coverage run -m pytest -W ignore::DeprecationWarningwith mongomock: 2610 passed, 11 skipped, coverage 100%. The chart tests ran too, afterhelm dependency build deployment. The tests against a real MongoDB didn't run locally (CI runs them).CI passed. The cause has nothing to do with this change: Trivy reports two fixable HIGH OpenSSL CVEs in the base image's Debian packages (libssl3t64,openssl,openssl-provider-legacy, 3.5.9-1deb13u1, fixed in 3.5.10-1deb13u1). They are CVE-2026-107494 and CVE-2026-124709, both denial of service in QUIC.dev's last run (2 Dec) passed, so the cause is a newer vulnerability database.devwould fail the same way now.Merge gate
The image scan must pass. That needs a separate fix for the base image
elixircloud/foca:0.23.0-py3.13: a FOCA image rebuilt with OpenSSL 3.5.10, or an accepted exception in.trivyignore.yaml. That fix is a decision outside this PR.Declined review findings
policies_revisionin the upgrade notes: proTES' docs don't document that FOCA setting anywhere, and the notes describe the default behaviour.docs/upgrading.md("In 0.4.0, owners and admins got ..."): the annotation already says that admins no longer get the provenance, and the section describes that version.Open questions
None.
Closes #568
🤖 Generated with Claude Code
https://claude.ai/code/session_011FSoqPsbB5s4NvhhYYcDJk
Summary by Sourcery
Limit task provenance access to its owner and remove the admin provenance permission from the base access-control configuration.
Bug Fixes:
Documentation:
Tests: